const add = (...args) => {
    return args.reduce((total, currentValue) => total + currentValue, 0);
};
console.log(add(1, 2));
console.log(add(1, 2, 3)); 